<!--
 * @Author: your name
 * @Date: 2022-04-16 22:11:27
 * @LastEditTime: 2022-04-16 23:34:42
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \job-master\web\src\views\dashboard\components\JobsRation.vue
-->

<template>
  <!--各城市岗位数量占比  -->
  <div class="container">
    <div id="box3" class="echarts_container"></div>
  </div>
</template>

<script>
export default {
  mounted() {
     // 基于准备好的dom，初始化echarts实例
    var myChart = this.$echarts.init(document.getElementById("box3"));
    //绘制图表
    myChart.setOption({
  title: {
    text: '各城市岗位数量占比',
    subtext: 'Fake Data',
    left: 'center'
  },
  tooltip: {
    trigger: 'item'
  },
  legend: {
    orient: 'vertical',
    left: 'left'
  },
  series: [
    {
      name: 'Access From',
      type: 'pie',
      radius: '50%',
      data: [
        { value: 1048, name: '上海' },
        { value: 735, name: '北京' },
        { value: 580, name: '广州' },
        { value: 484, name: '南京' },
         { value:450, name: '深圳' },
        { value: 260, name: '西安' },
        { value: 300, name: '芜湖' }
      ],
      emphasis: {
        itemStyle: {
          shadowBlur: 10,
          shadowOffsetX: 0,
          shadowColor: 'rgba(0, 0, 0, 0.5)'
        }
      }
    }
  ]
})
  
}
}
</script>

<style lang="scss" scoped>
.container{
   .echarts_container{
    width: 830px;
    height: 410px;
  }
}
</style>